{%- if content contains '<code class="language-mermaid">' -%}
    {%- if site.mermaid.custom -%}
        <script src="{{ site.mermaid.custom }}"></script>
    {%- else -%}
        <script src="{{ base }}/assets/js/mermaid.min.js"></script>
    {%- endif %}
    <script>
        mermaid.initialize({% if site.mermaid.initialize %}{{ site.mermaid.initialize | jsonify }}{% else %}{}{% endif %});
    </script>
{%- endif %}
